<?php
/**
  *  http://connect.opensns.qq.com/my
  *  http://wiki.opensns.qq.com/wiki/%E3%80%90QQ%E7%99%BB%E5%BD%95%E3%80%91OAuth%E7%99%BB%E5%BD%95%E6%96%87%E6%A1%A3
  *  APP ID：203642
  *  APP KEY：24ffe002672412db74ad41867ec97f49 
  */
/*
 * class qzone
*/

require_once ('OAuth.cls.php');



class qzone extends OAuth {
    var $apiBaseUrl = 'http://openapi.qzone.qq.com/';
    var $format = 'json';
    var $signMethod='HMAC-SHA1';
    var $require_token_url="http://openapi.qzone.qq.com/oauth/qzoneoauth_request_token";
    /**
      *   获取用户信息
      */
    function get_user_info(){
	$url=$this->apiBaseUrl.'/user/get_user_info';
	$params=array();
	return $this->oauthRequire($url,$params,'get');
    }
    function oauthRequire($url, $params, $method = 'post', $multi = FALSE) {

	$params['oauth_token'] = $this->oauth_token_access;
	$params['format'] = $this->format;
	return parent::oauthRequire($url, $params, $this->appSecret . '&' . $this->oauth_token_secret_access, $method, 'json', $multi);
    }
    
}
?>